package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the HOSP_WORK_IN_ERX database table.
 * 
 */
@Entity
@Table(name="HOSP_WORK_IN_ERX")
@NamedQuery(name="HospWorkInErx.findAll", query="SELECT h FROM HospWorkInErx h")
public class HospWorkInErx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PRESCRIPTIONNUM_IN")
	private long prescriptionnumIn;

	private String status;

	@Temporal(TemporalType.DATE)
	@Column(name="\"TIME\"")
	private Date time;

	@Column(name="\"TYPE\"")
	private String type;

	//bi-directional many-to-one association to InDoctorAdvice
	@ManyToOne
	@JoinColumn(name="IN_DOCTOR_ADV_ID")
	private InDoctorAdvice inDoctorAdvice;

	/*//bi-directional many-to-one association to InErxCharge
	@ManyToOne
	@JoinColumn(name="IN_MEDICAL_ERX_ID")
	private InErxCharge inErxCharge;

	//bi-directional many-to-one association to InMedicalProjectCharge
	@ManyToOne
	@JoinColumn(name="IN_MEDICAL_PROJECT_ID")
	private InMedicalProjectCharge inMedicalProjectCharge;*/

	//bi-directional many-to-one association to LiveinrecordTable
	@ManyToOne
	@JoinColumn(name="LIVEID8")
	private LiveinrecordTable liveinrecordTable;

	//bi-directional many-to-one association to InErxCharge
	@OneToMany(mappedBy="hospWorkInErx")
	private List<InErxCharge> inErxCharges;

	//bi-directional many-to-one association to InMedicalProjectCharge
	@OneToMany(mappedBy="hospWorkInErx")
	private List<InMedicalProjectCharge> inMedicalProjectCharges;

	public HospWorkInErx() {
	}

	public long getPrescriptionnumIn() {
		return this.prescriptionnumIn;
	}

	public void setPrescriptionnumIn(long prescriptionnumIn) {
		this.prescriptionnumIn = prescriptionnumIn;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getTime() {
		return this.time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public InDoctorAdvice getInDoctorAdvice() {
		return this.inDoctorAdvice;
	}

	public void setInDoctorAdvice(InDoctorAdvice inDoctorAdvice) {
		this.inDoctorAdvice = inDoctorAdvice;
	}

	/*public InErxCharge getInErxCharge() {
		return this.inErxCharge;
	}

	public void setInErxCharge(InErxCharge inErxCharge) {
		this.inErxCharge = inErxCharge;
	}

	public InMedicalProjectCharge getInMedicalProjectCharge() {
		return this.inMedicalProjectCharge;
	}

	public void setInMedicalProjectCharge(InMedicalProjectCharge inMedicalProjectCharge) {
		this.inMedicalProjectCharge = inMedicalProjectCharge;
	}*/

	public LiveinrecordTable getLiveinrecordTable() {
		return this.liveinrecordTable;
	}

	public void setLiveinrecordTable(LiveinrecordTable liveinrecordTable) {
		this.liveinrecordTable = liveinrecordTable;
	}

	public List<InErxCharge> getInErxCharges() {
		return this.inErxCharges;
	}

	public void setInErxCharges(List<InErxCharge> inErxCharges) {
		this.inErxCharges = inErxCharges;
	}

	public InErxCharge addInErxCharge(InErxCharge inErxCharge) {
		getInErxCharges().add(inErxCharge);
		inErxCharge.setHospWorkInErx(this);

		return inErxCharge;
	}

	public InErxCharge removeInErxCharge(InErxCharge inErxCharge) {
		getInErxCharges().remove(inErxCharge);
		inErxCharge.setHospWorkInErx(null);

		return inErxCharge;
	}

	public List<InMedicalProjectCharge> getInMedicalProjectCharges() {
		return this.inMedicalProjectCharges;
	}

	public void setInMedicalProjectCharges(List<InMedicalProjectCharge> inMedicalProjectCharges) {
		this.inMedicalProjectCharges = inMedicalProjectCharges;
	}

	public InMedicalProjectCharge addInMedicalProjectCharge(InMedicalProjectCharge inMedicalProjectCharge) {
		getInMedicalProjectCharges().add(inMedicalProjectCharge);
		inMedicalProjectCharge.setHospWorkInErx(this);

		return inMedicalProjectCharge;
	}

	public InMedicalProjectCharge removeInMedicalProjectCharge(InMedicalProjectCharge inMedicalProjectCharge) {
		getInMedicalProjectCharges().remove(inMedicalProjectCharge);
		inMedicalProjectCharge.setHospWorkInErx(null);

		return inMedicalProjectCharge;
	}

}